# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Stefano Facchini <stefano.facchini@gmail.com>

pkgname=libosinfo
pkgver=1.10.0
pkgrel=2
pkgdesc='GObject based library API for managing information about operating systems, hypervisors and the (virtual) hardware devices they can support'
arch=('loong64' 'x86_64')
url='https://libosinfo.org/'
license=('GPL' 'LGPL')
depends=('glib2' 'hwdata' 'libsoup3' 'libxslt' 'osinfo-db')
makedepends=('check' 'gobject-introspection' 'gtk-doc' 'meson' 'vala')
options=('debug')
source=("https://releases.pagure.org/libosinfo/$pkgname-$pkgver.tar.xz"{,.asc})
validpgpkeys=('DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF'  # Daniel P. Berrange
              '09B9C8FF223EF113AFA06A39EE926C2BDACC177B'  # Fabiano Fidêncio
              '206D3B352F566F3B0E6572E997D9123DE37A484F') # Victor Toso de Carvalho <me@victortoso.com>
sha256sums=('a252e00fc580deb21da0da8c0aa03b8c31e8440b8448c8b98143fab477d32305'
            'SKIP')

build() {
  local meson_options=(
    -D with-usb-ids-path=/usr/share/hwdata/usb.ids
    -D with-pci-ids-path=/usr/share/hwdata/pci.ids
  )

  arch-meson $pkgname-$pkgver build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
